import request from "@/utils/request"
// 获取管理员列表
export const getRuleListFn = () => {
    return request({
        url:`admin/rule/1`,
        method:'GET'
    })
}

// 新增菜单权限
export const addRulesFn = (data) => {
    return request({
        url:`admin/rule`,
        method:'POST',
        data
    })
}

// 修改菜单权限
export const editRulesFn = (id,data) => {
    return request({
        url:`admin/rule/${id}`,
        method:'POST',
        data
    })
}
// 修改菜单启用状态
export const editStatusFn = (id,status) => {
    return request({
        url:`admin/rule/${id}/update_status`,
        method:'POST',
        data:{
            status
        }
    })
}
// 删除菜单
export const delRulesFn = (id,status) => {
    return request({
        url:`admin/rule/${id}/delete`,
        method:'POST',
        data:{
            status
        }
    })
}